<template>
    <div>
        <nav-bar title="新闻详情"></nav-bar>
<!--        <div v-html="data.content">-->

<!--        </div>-->
<!--        v-html="data.content"-->
        <div class="" v-html="message"></div>
        <mt-button size="large" type="danger" @click="pingun">评论</mt-button>
    </div>
</template>

<script>

    export default {
        name: "new_getnew",
        data(){
            return {
                getnews:{},
                message:""
            }
        },methods:{
            pingun(){
                this.$router.push({name:"getnew_pinglun"})
            }
        },
        created() {
            console.log("getnew?id="+this.$route.query.id);
          this.Ajax.get("getnew?id="+this.$route.query.id)
            .then(res=>{
                // console.log(res.data);
                this.getnews=res.data.message;
                console.log(res);
                console.log(this.getnews);
                this.message=this.getnews.content;
                // console.log(this.message);
                // console.log(res.data.message[0]);
                // console.log("1")
            })
            .catch(err=>{
                console.log("err");
            })

            // this.message="ddd"+"dddd"+this.data.title;
        }
        // ,
        // mounted() {
        //     this.message="ddd"+"dddd"+this.data.title;
        // }
    }
</script>

<style scoped>

</style>